To reduce noise in digital images, and/or to effect artistic changes to the images, a filtering technique is used in which pixel values are replaced by median values. The median values are typically derived from a histogram of the image. A histogram is a representation of the frequency with which particular pixel values appear in the image (or image subset known as a “window”) of interest. To reduce the effects of noise, small windows typically are used, whereas to implement artistic effects, larger windows are used.
In any case, considerable computational effort and time can be spent calculating the median of each window even when advantageously using a histogram. Not surprisingly, methods to reduce computational complexity have been introduced, including by Perreault et al. in “Median Filtering in Constant Time”, IEEE Transactions on Image Processing, pages 2389-2394 (2007). Perreault breaks down the two-dimensional histogram calculation into one-dimensional columnar calculations to achieve O(1) complexity, but as understood herein, the calculations in Perreault are sequential, prolonging processing time.